package beans;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.beans.VetoableChangeListener;
import java.beans.VetoableChangeSupport;
import java.io.Serializable;

public class JNTTypeECEnseignant implements Serializable {

	private static final long serialVersionUID = -7782263545159165145L;
	
	private Type type;
	private EC eC;
	private Enseignant enseignant;
	private int nbHeures;

	PropertyChangeSupport changeSupport;
	VetoableChangeSupport vetoableSupport;
	
	public JNTTypeECEnseignant() {}
	
	public JNTTypeECEnseignant(Type type, EC eC, Enseignant enseignant,
			int nbHeures) {
		super();
		this.type = type;
		this.eC = eC;
		this.enseignant = enseignant;
		this.nbHeures = nbHeures;
	}

	public Type getType() {
		return type;
	}
	
	public void setType(Type type) {
		this.type = type;
	}
	
	public EC geteC() {
		return eC;
	}
	
	public void seteC(EC eC) {
		this.eC = eC;
	}
	
	public Enseignant getEnseignant() {
		return enseignant;
	}
	
	public void setEnseignant(Enseignant enseignant) {
		this.enseignant = enseignant;
	}
	
	public int getNbHeures() {
		return nbHeures;
	}
	
	public void setNbHeures(int nbHeures) {
		this.nbHeures = nbHeures;
	}
	
	public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
		changeSupport.addPropertyChangeListener(listener);
	}
	
	public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
		changeSupport.removePropertyChangeListener(listener);
	}
	
	public synchronized void addVetoableChangeListener(VetoableChangeListener listener) {
		vetoableSupport.addVetoableChangeListener(listener);
	}
	
	public synchronized void removeVetoableChangeListener(VetoableChangeListener listener) {
		vetoableSupport.removeVetoableChangeListener(listener);
	} 
}
